import request from '@/utils/request'

// 复制备课
export function copyPersonPrepareLesson(data) {
  return request({
    url: '/personPrepareLesson/copy',
    method: 'post',
    params: data
  })
}
// 创建备课-不校验分类/主题是否重复
export function createNotCheckPersonPrepareLesson(data) {
  return request({
    url: '/personPrepareLesson/createNotCheck',
    method: 'post',
    data
  })
}

// 创建备课
export function createPersonPrepareLesson(data) {
  return request({
    url: '/personPrepareLesson/create',
    method: 'post',
    data
  })
}

// 删除课件
export function deleteResCourseware(data) {
  return request({
    url: '/personPrepareLesson/deleteResCourseware',
    method: 'delete',
    params: data
  })
}

export function deleteClassTime(data) {
  return request({
    url: '/personPrepareLesson/deleteClassTime',
    method: 'delete',
   params:data
  })
}

// 备课详情
export function getPersonPrepareLessonDetail(data) {
  return request({
    url: '/personPrepareLesson/detail',
    method: 'get',
    params: data
  })
}

// 获取知识点标签元数据
export function getMetadataTagByType(data) {
  return request({
    url: '/personPrepareLesson/getMetadataTagByType',
    method: 'get',
    params: data
  })
}

// 获取模板
export function getTemplate(data) {
  return request({
    url: '/personPrepareLesson/getTemplate',
    method: 'post',
    params: data
  })
}

// 加载分类
export function loadCategory(data) {
  return request({
    url: '/personPrepareLesson/loadCategory',
    method: 'get',
    params: data
  })
}

// 查看备课
export function personPrepareLessonPage(data) {
  return request({
    url: '/personPrepareLesson/page',
    method: 'post',
    data
  })
}

// 发布备课
export function personPrepareLessonPublish(data) {
  return request({
    url: '/personPrepareLesson/publish',
    method: 'post',
    params: data
  })
}

// 引用备课
export function quotePrepareLessonPage(data) {
  return request({
    url: '/personPrepareLesson/quote',
    method: 'post',
    params: data
  })
}

// 编辑课堂实录
export function saveResCourseVideo(data) {
  return request({
    url: '/personPrepareLesson/saveResCourseVideo',
    method: 'post',
    params: data
  })
}

// 编辑课件
export function addClassTime(teachingDesignId) {
  return request({
    url: '/personPrepareLesson/addClassTime',
    method: 'post',
    params: {
      teachingDesignId
    }
  })
}

// 编辑课件
export function saveResCourseware(data) {
  return request({
    url: '/personPrepareLesson/saveResCourseware',
    method: 'post',
    params: data
  })
}
// 编辑学案
export function saveResStudent(data) {
  return request({
    url: '/personPrepareLesson/saveResStudent',
    method: 'post',
    params: data
  })
}

// 编辑教案
export function saveResTeaching(data) {
  return request({
    url: '​/personPrepareLesson​/saveResTeaching',
    method: 'post',
    params: data
  })
}
// 编辑教学反思
export function saveResTeachingReflection(data) {
  return request({
    url: '​/personPrepareLesson/saveResTeachingReflection',
    method: 'post',
    params: data
  })
}
// 更新备课
export function updatePersonPrepareLesson(data) {
  return request({
    url: '/personPrepareLesson/update',
    method: 'post',
    data
  })
}

// 更新基础信息
export function updateBaseInfo(data) {
  return request({
    url: '/personPrepareLesson/updateBaseInfo',
    method: 'post',
    data
  })
}

//复制备课
export function personPrepareLessonCopy(params) {
  return request({
    url:"/personPrepareLesson/copy",
    method: 'post',
    params
  })
}


//删除备课
export function personPrepareLessonDelete(teachingDesignId) {
  return request({
    url:"/personPrepareLesson/delete",
    method: 'delete',
    params:{teachingDesignId}
  })
}
